]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Fix crash in theme-node-transition
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 21 Sep 2011 20:37:06 +0000 (22:37 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 26 Sep 2011 17:52:36 +0000 (19:52 +0200)
Setting up the framebuffers for transitions may fail, in which case
the material used for drawing is left uninitialized, so trying to
access it results in a crash.
Instead bail out in this case, which means that we won't paint
anything during the transition - still, drawing errors are better
than crashes ...

https://bugzilla.gnome.org/show_bug.cgi?id=659676

src/st/st-theme-node-transition.c

index 3da45ae050517f7d238be06209ae8d7300b1afa8..7bb83cd91272d164a39dc9396558bed4e46f9bc1 100644 (file)
@@ -328,6 +328,9 @@ st_theme_node_transition_paint (StThemeNodeTransition *transition,
 
       calculate_offscreen_box (transition, allocation);
       priv->needs_setup = !setup_framebuffers (transition, allocation);
+
+      if (priv->needs_setup) /* setting up framebuffers failed */
+        return;
     }
 
   cogl_color_set_from_4f (&constant, 0., 0., 0.,